package com.burgeon.backend.SHOPBACKEND.controller;

import com.burgeon.backend.SHOPBACKEND.service.BackendTemplateService;
import com.burgeon.backend.stsutil.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("templateConfig")
public class BackendTemplateController extends BaseController {
    @Autowired
    private BackendTemplateService backendTemplateService;


    /**
     * 修改模板配置信息
     * @param account
     * @return
     */
    @RequestMapping("updateConfig")
    public ResponseResult<Integer> updateConfig(String account, String sendTime, String intervalTime){
        Integer data = backendTemplateService.UpdateTemplate8Config(account, sendTime, intervalTime);
        return new ResponseResult<>(SUCCESS,data);
    }

}
